import { popularLevelOptions } from "./store";
export const fetchInfo = async (params = {}) => {
  try {
    const res: any = await popularApi.queryDataById(params);
    const {
      data: { popularLevel = [] },
    } = res;
    popularLevelOptions.value = arrayToOptions(popularLevel, {
      label: "name",
      value: "level",
    });
  } catch (error: any) {
    message.error(error.message);
  }
};
